<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/include/TagLib.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb18030" />
<title>QQ邮箱 - 新增联系人</title>
<link rel="stylesheet" type="text/css" href="<c:url value='index_files/comm20100f8b45.css' />" />
<link rel="stylesheet" type="text/css" href="<c:url value='index_files/getcss.css' />" />
<script language="javascript" src="<c:url value='/js/jquery-1.4.2.min.js' />"></script>
<script type="text/javascript">
	function check(){
		var firstName = $("#firstName").val();
		var lastName = $("#lastName").val();
		var email = $("#email").val();
		if(firstName==null||firstName==''||lastName==null||lastName==''){
			alert("姓名必须填写！");
			return false;
		}
		var emailPat=/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
        if(!emailPat.test(email))
        {
             alert('请输入有效的Email！');
             return false;
        }
        return true;
	}
</script>
</head>
<body class="tbody" >
<form id="AddressEdit" name="AddressEdit" action="<c:url value='/createContact.do' />" method="POST" target="mainFrame" >
<table width="100%" border="0" cellspacing="0" cellpadding="2" class="toolbg" >
	<tr>
		<td align="left" nowrap class="barspace toolbgline">
		<input type="submit" value=" 保存信息 " class="wd2 btn" onclick="return check();" /><input type="button" value=" 取消 " class="wd1 btn" onClick="history.go(-1);"/>
		</td>
	</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="4" class="settingtable"  >
	<tbody>
	<tr>
		<td colspan="2"><div class="addr_line" style="font-size:14px;padding:8px 0 4px 2px;margin:4px 15px">新建联系人</div></td>
	</tr>	
	<tr class="normal black">
		<td width="120" style="text-align:right;"><div style="width:120px;white-space:nowrap;">姓：</div></td>
		<td width="96%" align="left">
			<input id="firstName" type="text"  class="txt" size="28" name="firstName" value="" />
			&nbsp;<font color="#FF0000">*</font></td>
	</tr>
	<tr class="normal black">
		<td width="120" style="text-align:right;"><div style="width:120px;white-space:nowrap;">名：</div></td>
		<td width="96%" align="left">
			<input id="lastName" type="text"  class="txt" size="28" name="lastName" value="" />
			&nbsp;<font color="#FF0000">*</font></td>
	</tr>
	<tr class="normal black">
		<td align="right">电子邮件：</td>
		<td align="left">
			<input id="email" type="text" name="email" class="txt noime" size="28" value="" />
			&nbsp;<font color="#FF0000">*</font>
		</td>
	</tr>
	</tbody>

	<tbody id="extendInfo"  >
	<tr class="normal black">
		<td align="right">手机号码：</td>
		<td align="left"><input type="text"  name="mobile" class="txt noime" size="28" value="" /></td>
	</tr>
	<tr class="normal black">
		<td align="right">固定电话：</td>
		<td align="left"><input type="text"  name="telephone" class="txt noime" size="28" value="" /></td>
	</tr>
	<tr class="normal black">
		<td align="right">工作岗位：</td>
		<td align="left"><input type="text"  name="job" class="txt" size="28" value="" /></td>
	</tr>
	<tr class="normal black">
		<td align="right">标题：</td>
		<td align="left"><input type="text"  name="title" class="txt" size="28" value="" /></td>
	</tr>
	<tr class="normal black">
		<td align="right">所属公司：</td>
		<td align="left">
			<select id="idCompany" style="width:192px;height:22px;" name="tblcompanies.idCompany">
				<c:forEach items="${tblCompaniesList}" var="company" >
			 		<option value="${company.idCompany}">${company.companyName}</option>
			 	</c:forEach>
			 </select>
		</td>
	</tr>
	</tbody>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="2" class="toolbg" >
	<tr>
		<td align="left" nowrap class="barspace toolbgline">
			<input type="submit" value=" 保存信息 " class="wd2 btn" onclick="return check();" /><input type="button" value=" 取消 " class="wd1 btn" onClick="history.go(-1);"/>
		</td>
	</tr>
</table>
<input type="hidden" name="list_index" id="list_index" value="">
</form>
</body>
</html>